package cn.springspace.app.enums;

public class EnumUtils {
    public static <C extends CommonTypeEnum> String getLabelCnByValue(C enumType, String value) {
        return enumType.getLabelCnByValue(value);
    }

    public static String getLabelCnByValue(Class<? extends CommonTypeEnum> enumType, String value) throws InstantiationException, IllegalAccessException {

        CommonTypeEnum commonTypeEnum = enumType.newInstance();
        return commonTypeEnum.getLabelCnByValue(value);
    }
}
